package com.pqmvc{
	public class PQCommand implements ICommand{
		private var md:PQMediator;
		public function PQCommand()
		{
		}
		public function execute(param:Object=null, type:String=null):void{
			
		}
		public function set Mediator(m:PQMediator):void{
			if(md!=null)throw new Error("Mediator已赋值");
			md=m;
		}
		/**监听消息**/
		protected function addListen(event:String,callBack:Function):void{
			md.addListen(event,callBack);
		}
		/**广播**/
		protected function call(name:String,param:Object=null):void{
			md.call(name,param);
		}
		/**删除监听**/
		protected function removeListen(name:String,func:Function):void{
			md.removeListen(name,func);
		}
		/**
		 *获取共享数据 
		 * @param key 钥匙
		 * @param args 参数
		 * @return 
		 */		
		public function getData(key:String,...args):Object{
			return md.getData(key,args);
		}
	}
}